import { Model, AppEvent } from "../../framework/framework";
import { FormatDateTime } from "../../framework/common";
import { } from "../logics/logic";

class IndexModel extends Model implements IModel {

    constructor(metiator: IMediator) {
        super(metiator);
    }

    public initialize() {
        this.subscribeToEvents([
            new AppEvent("app.model.index.index", null, (e, args) => { this.index(args); })
        ]);
    }

    public dispose() {
        this.unsubscribeToEvents();
    }

    private index(args: string): void {
        this.triggerEvent(new AppEvent("app.view.index.index", args, null));
    }
}

export { IndexModel };
